{% block header %}
<div class="settings">
    <div class="simple-link">
        <table>
            <tr>
                <td>
                    {% if admin %}
                    <form class="form" action="/language/edit" method="post">
                    <div class="button">
                        <input name="edit" value="Edit" type="submit" />
                        <input name="size_key" value="{{ size.key }}" type="hidden" />
                        <input name="language_key" value="{{ language.key }}" type="hidden" />
                    </div>
                    </form>
                    {% endif %}
                </td>
                <td>
                    <form class="form" action="/language" method="post">
                    <div class="button">
                            <select name="select_language_key">
                                {% for l in languages %}
                                    {% ifequal l.key language.key %}
                                        <option selected="selected" value="{{ l.key }}">{{ l.name }}</option>
                                    {% else %}
                                        <option value="{{ l.key }}">{{ l.name }}</option>
                                    {% endifequal %}
                                {% endfor %}
                            </select>
                            <input name="select" value="{{ settings.select }}" type="submit" />
                            <input name="action" value="{{ action }}" type="hidden" />
                            <input name="page_id" value="{{ page_id }}" type="hidden" />
                            <input name="size_key" value="{{ size.key }}" type="hidden" />
                            <input name="language_key" value="{{ language.key }}" type="hidden" />
                    </div>
                    </form>
                </td>
                <td>
                    {% if admin %}
                    <form class="form" action="/size/edit" method="post">
                    <div class="button">
                        || <input name="edit" value="Edit" type="submit" />
                        <input name="size_key" value="{{ size.key }}" type="hidden" />
                        <input name="language_key" value="{{ language.key }}" type="hidden" />
                    </div>
                    </form>
                    {% endif %}
                </td>
                <td>
                    <form class="form" action="/size" method="post">
                    <div class="button">
                        <select name="select_size_key">
                            {% for s in sizes %}
                                {% ifequal s.key size.key %}
                                    <option selected="selected" value="{{ s.key }}">{{ s.name }}</option>
                                {% else %}
                                    <option value="{{ s.key }}">{{ s.name }}</option>
                                {% endifequal %}
                            {% endfor %}
                        </select>
                        <input name="select" value="{{ settings.select }}" type="submit" />
                        <input name="action" value="{{ action }}" type="hidden" />
                        <input name="page_id" value="{{ page_id }}" type="hidden" />
                        <input name="size_key" value="{{ size.key }}" type="hidden" />
                        <input name="language_key" value="{{ language.key }}" type="hidden" />
                    </div>
                    </form>
                </td>
                <td>
                    {% if admin %}
                     || <a href="/settings/edit?language={{ language.locale_id }}">Settings</a>
                    {% endif %}
                </td>
            </tr>
        </table>
    </div>
</div>
<div class="logo">
    <table>
        <tr>
            <th>
                <a href="/">
                    <img src="/static/img/logo_gd_monde.gif" alt="logo" />
                </a>
            </th>
            <td>
                <a class="title">Grand Monde</a>
            </td>
        </tr>
    </table>
</div>
<div class="header">
    <div class="header-links">
        <a href="/wiki?language={{ language.locale_id }}&amp;size={{ size.width }}">
            {{ settings.wiki }}
        </a> |
        {% if admin %}
        <a href="/author/show?language={{ language.locale_id }}&amp;size={{ size.width }}">
            {{ settings.author }}
        </a> |
        <a href="/collection/show?language={{ language.locale_id }}&amp;size={{ size.width }}">
            {{ settings.collection }}
        </a> |
        {% endif %}
        <a href="/exposition?language={{ language.locale_id }}&amp;size={{ size.width }}">
            {{ settings.exposition }}
        </a> |
        <a href="/picture?language={{ language.locale_id }}&amp;size={{ size.width }}">
            {{ settings.picture }}
        </a> |
        <a href="/contact?language={{ language.locale_id }}&amp;size={{ size.width }}">
            {{ settings.contact }}
        </a>
    </div>
</div>
{% endblock %}
